Skip to content

This pull request focuses on improving project documentation, updating versioning, enhancing test coverage, and adding a utility script for database maintenance.#51

Merged
goldlabelapps merged 6 commits into
masterfrom
staging
Apr 4, 2026
Merged

Conversation

@goldlabelapps
Copy link
Copy Markdown
Owner

The most significant change is a comprehensive rewrite of the README.md to provide clearer setup instructions, feature descriptions, and project structure. Additionally, the PR introduces a script for resetting flags in the database, updates versioning, and refines test organization and metadata structure.

Documentation Improvements:

  • Major rewrite and expansion of README.md for better clarity, including setup instructions, feature overview, API documentation, directory structure, and contribution guidelines.

Database Utilities:

  • Added reset_flag_and_hide.py script to reset all flag and hide fields to FALSE in the prospects table, facilitating easier database maintenance.

Versioning:

  • Bumped application version from 2.0.8 to 2.1.1 in app/__init__.py.

Testing Improvements:

  • Replaced and improved prospects-related tests: removed tests/prospects/test_prospects.py and added a more comprehensive tests/test_prospects.py with enhanced checks for endpoint responses and metadata. [1] [2]

Metadata Consistency:

  • Updated make_meta utility to use title and base keys instead of message and base_url for improved consistency in API responses.

Add a utility script app/api/prospects/database/reset_flag_and_hide.py that resets the `flag` and `hide` columns to FALSE for all rows in the prospects table. It obtains a DB connection from get_db_connection(), executes the UPDATE, commits on success, rolls back on exception, and ensures cursor/connection are closed. The script can be run directly as a standalone command.
Update package version to 2.1.1 in app/__init__.py and add a new test (tests/test_prospects.py) that exercises the /prospects endpoint using FastAPI TestClient. The test asserts a 200 response, checks that the payload contains "meta" and "data" (with data as a list), verifies presence of expected keys in data items ("init" and "search"), and validates meta fields (severity and message). This adds basic endpoint coverage to prevent regressions.
Change meta payload keys in make_meta: replace "message" with "title" and "base_url" with "base". Update tests to expect the new "title" key and add a test for /prospects list. Remove the redundant tests/prospects/test_prospects.py file to consolidate test coverage.
@goldlabelapps goldlabelapps added this to the MVP milestone Apr 4, 2026
@goldlabelapps goldlabelapps self-assigned this Apr 4, 2026
@goldlabelapps goldlabelapps merged commit a274274 into master Apr 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant